package com.eureka.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author: xuyanan
 * @date: 2021/5/7
 */
@RestController
public class Controller {

    @Autowired
    private RestTemplate restTemplate;

    @GetMapping("/getName")
    public String getName() {
        return restTemplate.getForObject("http://ClientA/getName", String.class);
    }
}
